console: correct the source status values in MaintainedObjectSourceStatus - #38604
Draft
ggevay wants to merge 1 commit into
Draft
console: correct the source status values in MaintainedObjectSourceStatus#38604ggevay wants to merge 1 commit into
ggevay wants to merge 1 commit into
Conversation
…atus `MaintainedObjectSourceStatus` documents the `status` and `error` fields of the hydration-aggregate feed, which reads `mz_source_statuses`. That relation never reports `failed`: the storage status enum has no such variant, its parser rejects the string, and no writer produces it. It can report `dropped`, which the comment omitted. Only `stalled` carries an error. Comment-only; see MaterializeInc#38585 for the catalog-side correction. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
MaintainedObjectSourceStatus(console/src/platform/maintained-objects/queries.ts) documents thestatusanderrorfields that the hydration-aggregate feed delivers. That feed selectsstatus, errorfrommz_source_statuses(buildHydrationAggregateQuery, filtered only bytype not in ('subsource','progress')), and the two comments do not match what that relation can contain:failedis never reported. The storageStatusenum (src/storage-client/src/client.rs) has no such variant, itsFromStrrejects the string, and no writer emits it. #38585 corrected the catalog comments and docs accordingly.droppedis missing from the list, though the relation reports it and this query does not filter it out.erroris populated only forstalled; no other status carries one.Description
Comment-only change to the two JSDoc lines. No behaviour change.
Not included, for the Console team to decide
While checking this I found that
failedis not only a stale comment — it is a first-class value in the Console's source/sink status handling, for a status the database cannot produce:ConnectorStatus(console/src/api/materialize/types.ts) includes"failed".connectorStatusToHealth(console/src/platform/connectors/utils.ts) maps it tounhealthy.sourceStatusToColor(console/src/platform/clusters/format.ts) gives it a colour.StatusPillrenders it.SOURCE_STATUS_BUCKETS(console/src/platform/maintained-objects/filters.ts) exposes it as a user-facing filter option labelled "Failed", which can never match a source or sink.I left that alone deliberately: removing a union member touches exhaustive switches and a visible filter list, which is a UI decision and needs a typecheck run I can't do from here. Worth a look — as far as I can tell no released version ever produced
failed, so this is not version-skew tolerance. NoteConnectorStatusis used only for sources and sinks; privatelink/SSH connection statuses are a separate set that legitimately includesfailed.Also not touched:
console/types/materialize.d.tsstill carries the old comment text in four places. It is kysely-codegen output ("do not edit it manually") and will correct itself on the nextyarn gen:typesagainst a build containing #38585.Verification
Comments only, no code paths touched.